﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using Maticsoft.DBUtility;

namespace BDCS.DAL
{
  public  class SelectResult
    {
      public DataSet GetList(string strWhere)
      {
          StringBuilder strSql = new StringBuilder();
          strSql.Append("select a.SAID,c.DCID");
          strSql.Append(" From T_SubBuildDcriterionDesignAttributes as a inner join  T_SubBuildDcriterionContents as c on a.SBDCID=c.SBDCID ");
          if (strWhere.Trim() != "")
          {
              strSql.Append(" where " + strWhere);
          }
          return DbHelperSQL.Query(strSql.ToString());
      }
      public DataSet GetListALL(string strWhere)
      {
          StringBuilder strSql = new StringBuilder();
          strSql.Append("select a.SAID,b.DCID ,c.DCID");
          strSql.Append(" From T_SubBuildDcriterionDesignAttributes as a inner join T_SubBuildDcriterionConditions as b on a.SBDCID=b.SBDCID inner join T_SubBuildDcriterionContents as c on b.SBDCID=c.SBDCID ");
          if (strWhere.Trim() != "")
          {
              strSql.Append(" where " + strWhere);
          }
          return DbHelperSQL.Query(strSql.ToString());
      }
    }
}
